package collection;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;

public class CollectionDemo1 {
    public static void main(String[] args) {
        Collection collection = new ArrayList();
        collection.add("one");
        collection.add("one");
        collection.add("one");
        collection.add("two");
        collection.add("three");
        System.out.println(collection);
        System.out.println(collection.size());
        System.out.println(collection.remove("one"));//true
        System.out.println(collection);
        System.out.println(collection.contains("one"));//false
        collection.clear();
        System.out.println(collection.isEmpty());//true
        System.out.println(collection);
        Collection<String> collection1 = new ArrayList<>();
    }
}
